/*
* Copyright (c) 2007 by Kirill Kolodyazhniy.
* See the file "license.terms" for information on usage and redistribution.
*/

#ifndef M_RENDERWINDOW_H
#define M_RENDERWINDOW_H

#include "rendertarget.h"
#include "presentparams.h"
#include "refptr.h"
#include "renderwindowinfo.h"

#include <string>

namespace Engine
{
	/**
	*   Abstract base class for render windows.
	*/
	class RenderWindow: public RenderTarget
	{
	public:
		typedef std::vector<std::pair<unsigned int,unsigned int> > Resolutions;
		typedef std::vector<unsigned int> FSAAModes;

		virtual ~RenderWindow(){}

		/**
		*   Get system specific window id.
		*/
		virtual	RefPtr<RenderWindowInfo> GetID() = 0;

		/**
		*   Creates & displays the new window
		*/
		virtual void Create(const std::string& name, const PresentParams& pp) = 0;

		/**
		*   Swaps the frame buffers to display the next frame.
		*/
		virtual void SwapBuffers() = 0;

		/**
		*   Update targets content (render).
		*/
        virtual void Update(void);

		/**
		*   Return list of available screen resolutions for this window.
		*/
		virtual Resolutions GetAvailableResolutions() const = 0;

		/**
		*   Set new resolution
		*/
		virtual void SetResolution(unsigned int width, unsigned int height) = 0;

		/**
		*   Return list of available antialiasing modes(MSAA) for this window.
		*/
		virtual FSAAModes GetAvailableFSAAModes() const = 0;

		/**
		*   Set new antialiasing mode.
		*/
		virtual void SetFSAAMode(unsigned int mode) = 0;

		/**
		*   Get current FSAA mode.
		*/
		virtual unsigned int GetFSAAMode() = 0;

		/**
		*   Set fullscreen mode.
		*/
		virtual void SetFullScreen(bool val) = 0;

		/**
		*   Return true if in fullscreen mode.
		*/
		virtual bool IsFullScreen() = 0;
	};
}

#endif
